<template>
  <div class="module-box">
    <div class="notice-wrapper">
      <i class="el-icon-bell icon-left" />
      <span class="notice-text">{{ module.props.text }}</span>
      <i class="el-icon-arrow-right icon-right" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'NoticeModule',
  props: ['module'],
}
</script>

<style scoped>
.module-box {
  position: relative;
  padding: 10px;
  background-color: rgb(242, 246, 252);
  min-height: 20px;
  display: flex;
  align-items: flex-end; /* 保证公告在底部 */
  justify-content: center;
}

/* 公告内容盒子 */
.notice-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: #feffff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* 图标样式 */
.icon-left,
.icon-right {
  font-size: 16px;
  color: #3aba20;
}

/* 公告文字样式 */
.notice-text {
  flex: 1;
  margin: 0 8px;
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>
